package com.dragon.pear.pages.tabs.main.sample;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.dragon.pear.models.mock.MockUserItemResult;

import java.util.List;

/**
 * @author Chris Chan
 * Create on: 2025-09-10 09:05
 * Use for: Sample 数据中心
 * Explain:
 */
public class SampleViewModel extends ViewModel {
    // 示例数据
    private MutableLiveData<String> info;
    // 模拟数据
    private MutableLiveData<List<MockUserItemResult>> mockDataList;

    // 构造方法
    public SampleViewModel() {
        info = new MutableLiveData<>();
        mockDataList = new MutableLiveData<>();
        setInfo("测试");
    }

    // 示例数据读取
    public MutableLiveData<String> getInfo() {
        return info;
    }

    // 示例数据赋值
    public void setInfo(String info) {
        this.info.setValue(info);
    }

    public MutableLiveData<List<MockUserItemResult>> getMockDataList() {
        return mockDataList;
    }

    public void setMockDataList(List<MockUserItemResult> mockDataList) {
        this.mockDataList.setValue(mockDataList);
    }
}
